package org.dromara.tearoom.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.dromara.tearoom.domain.TerTransactions;
import org.dromara.tearoom.domain.vo.TerOrderDayVo;
import org.dromara.tearoom.domain.vo.TerTransactionsVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

/**
 * 钱包充值交易流水Mapper接口
 *
 * @author xch
 * @date 2025-05-08
 */
public interface TerTransactionsMapper extends BaseMapperPlus<TerTransactions, TerTransactionsVo> {
    @Select("SELECT COALESCE(SUM(amount),0) AS total_recharge_amount FROM ter_transactions WHERE create_time BETWEEN #{start} AND #{end} AND remark = '账户充值'")
    int selectTotalAmount(@Param("start") String start , @Param("end") String end);
}
